/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年1月13日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package decorator.test2;

/**
 * @Type DO
 * @Desc
 * @author 52489
 * @date 2019年1月13日
 * @Version V1.0
 */
public class DO {
    public static void main(String[] args) {
        Car car = new Car();
        car.move();

        System.out.println("------天上飞");
        FlyCar flyCar = new FlyCar(car);
        flyCar.move();
        System.out.println("------水上游");
        WaterCar waterCar = new WaterCar(car);
        waterCar.move();
        System.out.println("-----天上飞水上跑");
        WaterCar waterCar2 = new WaterCar(flyCar);
        waterCar2.move();
    }
}
